use Test;
use Rollout qw/set_attr/;
use strict;

BEGIN { plan tests => 4 }

unlink "/tmp/touch";
do { open my $touch, ">>/tmp/touch"; };

ok(set_attr "/tmp/touch", -mode=>"rwxr-x-wx");
ok(((stat "/tmp/touch")[2] & 07777) == 0753);
ok(set_attr "/tmp/touch", { uid=>"nobody", gid=>"mail" });
ok((stat "/tmp/touch")[4] == 99 and (stat _)[5] == 12);
